<%@ include file="/includes/includes.jsp" %>
<c:if test="${userBean.id != null}">
    <div class="editNote bold">
        <fmt:formatDate var="registrationDate" value='${userBean.regDate}' type='date' dateStyle='full'/>
        <fmt:formatDate var="lastActivity" value='${userBean.lastActivity}' type='both' dateStyle='full'
                        timeStyle='medium'/>
        <spring:message code="block.edit.user.login" arguments="${userBean.login}"/>&nbsp;&nbsp;
        <spring:message code="block.edit.user.regDate" arguments="${registrationDate}"/>&nbsp;&nbsp;
        <spring:message code="block.edit.user.lastActivity" arguments="${lastActivity}"/>
    </div>
</c:if>
<form:form commandName="userBean">
    <form:hidden path="id"/>
    <form:hidden path="regDate"/>
    <form:errors path="*" cssClass="error_block" element="div"/>
    <table width="100%" border="0">
        <tr>
            <td colspan="3" class="bottom_dotted"></td>
        </tr>
        <tr>
            <td>
                <label for="login" class="margin1"><spring:message code="login"/>*</label>
            </td>
            <td>
                <form:input id="login" path="login"/>
            </td>
            <td class="description">
                <spring:message code="rules.user.login"/>
            </td>
        </tr>
        <tr>
            <td colspan="3" class="bottom_dotted"></td>
        </tr>
        <tr>
            <td>
                <label for="firstName" class="margin1"><spring:message code="firstName"/></label>
            </td>
            <td>
                <form:input id="firstName" path="firstName"/>
            </td>
            <td class="description">
                <spring:message code="rules.user.firstName"/>
            </td>
        </tr>
        <tr>
            <td colspan="3" class="bottom_dotted"></td>
        </tr>
        <tr>
            <td>
                <label for="lastName" class="margin1"><spring:message code="lastName"/></label>
            </td>
            <td>
                <form:input id="lastName" path="lastName"/>
            </td>
            <td class="description">
                <spring:message code="rules.user.lastName"/>
            </td>
        </tr>
        <tr>
            <td colspan="3" class="bottom_dotted"></td>
        </tr>
        <tr>
            <td>
                <label for="enabled" class="margin1"><spring:message code="enabled"/></label>
            </td>
            <td>
                <form:checkbox id="enabled" path="enabled"/>
            </td>
            <td class="description">
                <spring:message code="rules.user.enabled"/>
            </td>
        </tr>
        <tr>
            <td colspan="3" class="bottom_dotted"></td>
        </tr>
        <tr>
            <td>
                <label for="accountNonExpired" class="margin1"><spring:message code="accountNonExpired"/></label>
            </td>
            <td>
                <form:checkbox id="accountNonExpired" path="accountNonExpired"/>
            </td>
            <td class="description">
                <spring:message code="rules.user.accountNonExpired"/>
            </td>
        </tr>
        <tr>
            <td colspan="3" class="bottom_dotted"></td>
        </tr>
        <tr>
            <td>
                <label for="credentialsNonExpired" class="margin1"><spring:message
                        code="credentialsNonExpired"/></label>
            </td>
            <td>
                <form:checkbox id="credentialsNonExpired" path="credentialsNonExpired"/>
            </td>
            <td class="description">
                <spring:message code="rules.user.credentialsNonExpired"/>
            </td>
        </tr>
        <tr>
            <td colspan="3" class="bottom_dotted"></td>
        </tr>
        <tr>
            <td>
                <label for="accountNonLocked" class="margin1"><spring:message code="accountNonLocked"/></label>
            </td>
            <td>
                <form:checkbox id="accountNonLocked" path="accountNonLocked"/>
            </td>
            <td class="description">
                <spring:message code="rules.user.accountNonLocked"/>
            </td>
        </tr>
        <tr>
            <td colspan="3" class="bottom_dotted"></td>
        </tr>
        <tr>
            <td colspan="3">
                <input type="submit" name="save" value="<spring:message code='save'/>" class="margin2p"/>
                <input type="submit" name="cancel" value="<spring:message code='cancel'/>" class="margin2p"/>
            </td>
        </tr>
    </table>
</form:form>